//
//  JMImagePickerViewController.m
//  ImagePicker
//
//  Created by Jamin on 2018/10/15.
//  Copyright © 2018 jamin. All rights reserved.
//

#import "JMImagePickerViewController.h"

#import "JMIPAlbumsViewController.h"


@interface JMImagePickerViewController ()

@end

@implementation JMImagePickerViewController

+ (instancetype)defImagePickerViewController {
    JMImagePickerViewController *ip = [[JMImagePickerViewController alloc] initWithRootViewController:[JMIPAlbumsViewController new]];
    if (ip) {
        
    }
    return ip;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

#pragma mark - Actions

- (void)dismiss:(id)sender {
    if ([self.pickerDelegate respondsToSelector:@selector(jmip_imagePickerViewControllerDidCancel:)])
        [self.pickerDelegate jmip_imagePickerViewControllerDidCancel:self];
    else
        [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)finishPickingAssets:(id)sender {
    if ([self.pickerDelegate respondsToSelector:@selector(jmip_imagePickerViewController:didFinishPickingAssets:)])
        [self.pickerDelegate jmip_imagePickerViewController:self didFinishPickingAssets:self.selectedAssets];
}



@end
